package com.graph.controller;

import com.graph.servcie.GraphService;
import com.graph.test.ShowGarphVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/graph")
public class GraphController {

    @Autowired
    private GraphService graphService ;

    @GetMapping("/findAll")
    public ShowGarphVo findAll(){
        return  graphService.findAll() ;
    }

    @GetMapping("/getRelateNodeFull")
    public ShowGarphVo getRelateNodeFull(@RequestParam("nodeName") String nodeName){
        System.out.println(nodeName);
        return graphService.getRelateNodeFull(nodeName);
    }


    @GetMapping("/getRelateNode")
    public ShowGarphVo ShowGarphVo(@RequestParam("nodeName") String nodeName){
        System.out.println(nodeName);
        return  null ;
    }


    /**
     * 获取节点信息
     * @param nodeName
     */
    @GetMapping("/getNodeInfo")
    public void getNodeInfo(@RequestParam("nodeName") String nodeName){
        System.out.println(nodeName);

    }

}
